

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>4.3. MDAnalysis topology tables &mdash; MDAnalysis v0.7.5-devel documentation</title>
    <link rel="stylesheet" href="../../_static/sphinxdoc.css" type="text/css" />
    <link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../../',
        VERSION:     '0.7.5-devel',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="../../_static/jquery.js"></script>
    <script type="text/javascript" src="../../_static/underscore.js"></script>
    <script type="text/javascript" src="../../_static/doctools.js"></script>
    <link rel="search" type="application/opensearchdescription+xml"
          title="Search within MDAnalysis v0.7.5-devel documentation"
          href="../../_static/opensearch.xml"/>
    <link rel="shortcut icon" href="../../_static/mdanalysis-logo.ico"/>
    <link rel="top" title="MDAnalysis v0.7.5-devel documentation" href="../../index.html" />
    <link rel="up" title="4. Topology modules" href="../topology_modules.html" />
    <link rel="next" title="4.4. PSF topology parser" href="PSFParser.html" />
    <link rel="prev" title="4.2. Common functions for topology building — MDAnalysis.topology.core" href="core.html" /> 
  </head>
  <body>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="../../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="PSFParser.html" title="4.4. PSF topology parser"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="core.html" title="4.2. Common functions for topology building — MDAnalysis.topology.core"
             accesskey="P">previous</a> |</li>
        <li><a href="../../index.html">MDAnalysis v0.7.5-devel documentation</a> &raquo;</li>
          <li><a href="../topology_modules.html" accesskey="U">4. Topology modules</a> &raquo;</li> 
      </ul>
    </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
            <p class="logo"><a href="../../index.html">
              <img class="logo" src="../../_static/mdanalysis-logo-200x150.png" alt="Logo"/>
            </a></p>
  <h4>Previous topic</h4>
  <p class="topless"><a href="core.html"
                        title="previous chapter">4.2. Common functions for topology building &#8212; <tt class="docutils literal docutils literal docutils literal"><span class="pre">MDAnalysis.topology.core</span></tt></a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="PSFParser.html"
                        title="next chapter">4.4. PSF topology parser</a></p>
  <h3>This Page</h3>
  <ul class="this-page-menu">
    <li><a href="../../_sources/documentation_pages/topology/tables.txt"
           rel="nofollow">Show Source</a></li>
  </ul>
<div id="searchbox" style="display: none">
  <h3>Quick search</h3>
    <form class="search" action="../../search.html" method="get">
      <input type="text" name="q" size="18" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    <p class="searchtip" style="font-size: 90%">
    Enter search terms or a module, class or function name.
    </p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <span class="target" id="module-MDAnalysis.topology.tables"></span><div class="section" id="mdanalysis-topology-tables">
<h1>4.3. MDAnalysis topology tables<a class="headerlink" href="#mdanalysis-topology-tables" title="Permalink to this headline">¶</a></h1>
<p>The module contains static lookup tables for atom typing etc. The
tables are dictionaries that are indexed by the element.</p>
<dl class="data">
<dt id="MDAnalysis.topology.tables.atomelements">
<tt class="descclassname">MDAnalysis.topology.tables.</tt><tt class="descname">atomelements</tt><a class="headerlink" href="#MDAnalysis.topology.tables.atomelements" title="Permalink to this definition">¶</a></dt>
<dd><p>Dictionary with hard-coded special atom names, used for guessing atom types
with <a class="reference internal" href="core.html#MDAnalysis.topology.core.guess_atom_type" title="MDAnalysis.topology.core.guess_atom_type"><tt class="xref py py-func docutils literal"><span class="pre">MDAnalysis.topology.core.guess_atom_type()</span></tt></a>.</p>
</dd></dl>

<dl class="data">
<dt id="MDAnalysis.topology.tables.masses">
<tt class="descclassname">MDAnalysis.topology.tables.</tt><tt class="descname">masses</tt><a class="headerlink" href="#MDAnalysis.topology.tables.masses" title="Permalink to this definition">¶</a></dt>
<dd><p>Dictionary table with atomic masses in u, indexed by the element from
<a class="reference internal" href="#MDAnalysis.topology.tables.atomelements" title="MDAnalysis.topology.tables.atomelements"><tt class="xref py py-data docutils literal"><span class="pre">atomelements</span></tt></a>.</p>
</dd></dl>

<p>The original raw data are stored as multi-line strings that are
translated into dictionaries with <a class="reference internal" href="#MDAnalysis.topology.tables.kv2dict" title="MDAnalysis.topology.tables.kv2dict"><tt class="xref py py-func docutils literal"><span class="pre">kv2dict()</span></tt></a>. In the future,
these tables might be moved into external data files; see
<a class="reference internal" href="#MDAnalysis.topology.tables.kv2dict" title="MDAnalysis.topology.tables.kv2dict"><tt class="xref py py-func docutils literal"><span class="pre">kv2dict()</span></tt></a> for explanation of the file format.</p>
<dl class="function">
<dt id="MDAnalysis.topology.tables.kv2dict">
<tt class="descclassname">MDAnalysis.topology.tables.</tt><tt class="descname">kv2dict</tt><big>(</big><em>s</em>, <em>convertor=&lt;type 'str'&gt;</em><big>)</big><a class="headerlink" href="#MDAnalysis.topology.tables.kv2dict" title="Permalink to this definition">¶</a></dt>
<dd><p>Primitive ad-hoc parser of a key-value record list.</p>
<ul class="simple">
<li>The string <em>s</em> should contain each key-value pair on a separate
line (separated by newline). The first white space after the key
separates key and value.</li>
<li>Empty lines are allowed.</li>
<li>Comment lines (starting with #) are allowed.</li>
<li>Leading whitespace is ignored.</li>
</ul>
<p>The <em>convertor</em> is a function that converts its single argument to
a valid Python type. The default is <a class="reference external" href="http://docs.python.org/library/functions.html#str" title="(in Python v2.7)"><tt class="xref py py-func docutils literal"><span class="pre">str()</span></tt></a> but other
possibilities are <a class="reference external" href="http://docs.python.org/library/functions.html#int" title="(in Python v2.7)"><tt class="xref py py-func docutils literal"><span class="pre">int()</span></tt></a> (for integers) or <a class="reference external" href="http://docs.python.org/library/functions.html#float" title="(in Python v2.7)"><tt class="xref py py-func docutils literal"><span class="pre">float()</span></tt></a> for
floating point numbers.</p>
</dd></dl>

<p>The raw tables are stored in the strings</p>
<dl class="data">
<dt id="MDAnalysis.topology.tables.TABLE_ATOMELEMENTS">
<tt class="descclassname">MDAnalysis.topology.tables.</tt><tt class="descname">TABLE_ATOMELEMENTS</tt><a class="headerlink" href="#MDAnalysis.topology.tables.TABLE_ATOMELEMENTS" title="Permalink to this definition">¶</a></dt>
<dd><p>Table with hard-coded special atom names, used for guessing atom types
with <a class="reference internal" href="core.html#MDAnalysis.topology.core.guess_atom_element" title="MDAnalysis.topology.core.guess_atom_element"><tt class="xref py py-func docutils literal"><span class="pre">MDAnalysis.topology.core.guess_atom_element()</span></tt></a>.</p>
</dd></dl>

<dl class="data">
<dt id="MDAnalysis.topology.tables.TABLE_MASSES">
<tt class="descclassname">MDAnalysis.topology.tables.</tt><tt class="descname">TABLE_MASSES</tt><a class="headerlink" href="#MDAnalysis.topology.tables.TABLE_MASSES" title="Permalink to this definition">¶</a></dt>
<dd><p>Plain-text table with atomic masses in u.</p>
</dd></dl>

</div>


          </div>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../../genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="../../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="PSFParser.html" title="4.4. PSF topology parser"
             >next</a> |</li>
        <li class="right" >
          <a href="core.html" title="4.2. Common functions for topology building — MDAnalysis.topology.core"
             >previous</a> |</li>
        <li><a href="../../index.html">MDAnalysis v0.7.5-devel documentation</a> &raquo;</li>
          <li><a href="../topology_modules.html" >4. Topology modules</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
        &copy; Copyright 2005-2011, Naveen Michaud-Agrawal, Elizabeth J. Denning, Joshua Adelman,
    Christian Beckstein (logo), David Caplan, Jan Domański, Philip Fowler,
    Joseph Goose, Benjamin Hall, Danny Parton, Tyler Reddy, Paul Rigor,
    and Oliver Beckstein.
      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
    </div>
  </body>
</html>